package zw_601_700.zw_674_最长连续递增序列;

class Solution {

    public static void main(String[] args) {
        int[] nums = {1, 3, 5, 7};
        int length = findLengthOfLCIS(nums);
        System.out.println(length);
    }

    public static int findLengthOfLCIS(int[] nums) {
        int count = 1, ans = 1;
        for (int i = 0; i < nums.length - 1; i++) {
            if (nums[i] < nums[i + 1]) {
                count++;
            } else {
                count = 1;
            }
            ans = count > ans ? count : ans;
        }
        return ans;
    }
}
